package com.sina.microblog.ut.utils
{
	import flash.utils.ByteArray;
	
	public class ResultDataUtils
	{
		[Embed(source="/../assets/data/ut/status_array.xml", mimeType="application/octet-stream")]
		private static const StatusArrayClass:Class;
		
		[Embed(source="/../assets/data/ut/status_single.xml", mimeType="application/octet-stream")]
		private static const StatusClass:Class;
		
		[Embed(source="/../assets/data/ut/comment_array.xml", mimeType="application/octet-stream")]
		private static const CommentArrayClass:Class;
		
		[Embed(source="/../assets/data/ut/comment_single.xml", mimeType="application/octet-stream")]
		private static const CommentClass:Class;
		
		[Embed(source="/../assets/data/ut/error.xml", mimeType="application/octet-stream")]
		private static const ErrorClass:Class;
	
		[Embed(source="/../assets/data/ut/counts.xml", mimeType="application/octet-stream")]
		private static const CountsClass:Class;
		
		[Embed(source="/../assets/data/ut/id_list.xml", mimeType="application/octet-stream")]
		private static const IdListClass:Class;
		
		[Embed(source="/../assets/data/ut/limits.xml", mimeType="application/octet-stream")]
		private static const LimitsClass:Class;
		
		[Embed(source="/../assets/data/ut/relationship.xml", mimeType="application/octet-stream")]
		private static const RelationshipClass:Class;
		
		[Embed(source="/../assets/data/ut/user_array.xml", mimeType="application/octet-stream")]
		private static const UserArrayClass:Class;
		
		[Embed(source="/../assets/data/ut/user_single.xml", mimeType="application/octet-stream")]
		private static const UserClass:Class;
		
		[Embed(source="/../assets/data/ut/message_array.xml", mimeType="application/octet-stream")]
		private static const MessageArrayClass:Class;
		
		[Embed(source="/../assets/data/ut/message.xml", mimeType="application/octet-stream")]
		private static const MessageClass:Class;
		
		[Embed(source="/../assets/data/ut/provinces.xml", mimeType="application/octet-stream")]
		private static const ProvincesClass:Class;
		
		private static var _commentArray:XML;
		private static var _comment:XML;
		private static var _counts:XML;
		private static var _error:XML;
		private static var _idList:XML;
		private static var _limits:XML;
		private static var _relationship:XML;
		private static var _statusArray:XML;
		private static var _status:XML;
		private static var _userArray:XML;
		private static var _user:XML;
		private static var _messageArray:XML;
		private static var _message:XML;
		private static var _provinces:XML;
		
		public static const oauthResult:String = 'oauth_token=73a807450edfe3201696bc3f7042cf04&oauth_token_secret=9191324d0654b9f81c19b301323b9374';
		
		public static function get commentArray():XML
		{
			if ( null == _commentArray )
			{
				var ba:ByteArray = new CommentArrayClass() as ByteArray;
				_commentArray = new XML(ba.readUTFBytes(ba.length));
			}
			return _commentArray;
		}
		
		public static function get comment():XML
		{
			if ( null == _comment )
			{
				var ba:ByteArray = new CommentClass() as ByteArray;
				_comment = new XML(ba.readUTFBytes(ba.length));
			}
			return _comment;
		}
		
		public static function get counts():XML
		{
			if ( null == _counts )
			{
				var ba:ByteArray = new CountsClass() as ByteArray;
				_counts = new XML(ba.readUTFBytes(ba.length));
			}
			return _counts;
		}
		
		public static function get error():XML
		{
			if ( null == _error )
			{
				var ba:ByteArray = new ErrorClass() as ByteArray;
				_error = new XML(ba.readUTFBytes(ba.length));
			}
			return _error;
		}
		
		public static function get idList():XML
		{
			if ( null == _idList )
			{
				var ba:ByteArray = new IdListClass() as ByteArray;
				_idList = new XML(ba.readUTFBytes(ba.length));
			}
			return _idList;
		}
		
		public static function get limits():XML
		{
			if ( null == _limits )
			{
				var ba:ByteArray = new LimitsClass() as ByteArray;
				_limits = new XML(ba.readUTFBytes(ba.length));
			}
			return _limits;
		}
		
		public static function get relationship():XML
		{
			if ( null == _relationship )
			{
				var ba:ByteArray = new RelationshipClass() as ByteArray;
				_relationship = new XML(ba.readUTFBytes(ba.length));
			}
			return _relationship;
		}
		
		public static function get statusArray():XML
		{
			if ( null == _statusArray )
			{
				var ba:ByteArray = new StatusArrayClass() as ByteArray;
				_statusArray = new XML(ba.readUTFBytes(ba.length));
			}
			return _statusArray;
		}
		
		public static function get status():XML
		{
			if ( null == _status )
			{
				var ba:ByteArray = new StatusClass() as ByteArray;
				_status = new XML(ba.readUTFBytes(ba.length));
			}
			return _status;
		}
		
		public static function get userArray():XML
		{
			if ( null == _userArray )
			{
				var ba:ByteArray = new UserArrayClass() as ByteArray;
				_userArray = new XML(ba.readUTFBytes(ba.length));
			}
			return _userArray;
		}
		
		public static function get user():XML
		{
			if ( null == _user )
			{
				var ba:ByteArray = new UserClass() as ByteArray;
				_user = new XML(ba.readUTFBytes(ba.length));
			}
			return _user;
		}
		
		public static function get messageArray():XML
		{
			if ( null == _messageArray )
			{
				var ba:ByteArray = new MessageArrayClass() as ByteArray;
				_messageArray = new XML(ba.readUTFBytes(ba.length));
			}
			return _messageArray;
		}
		public static function get message():XML
		{
			if ( null == _message )
			{
				var ba:ByteArray = new MessageClass() as ByteArray;
				_message = new XML(ba.readUTFBytes(ba.length));
			}
			return _message;
		}
		public static function get provinces():XML
		{
			if ( null == _provinces )
			{
				var ba:ByteArray = new ProvincesClass() as ByteArray;
				_provinces = new XML(ba.readUTFBytes(ba.length));
			}
			return _provinces;
		}
	}
}